package Netzwerkprogrammierung.g3.RMI;

import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;

public class RMIServer {

	public static void main(String[] args) throws RemoteException {
		
		LocateRegistry.createRegistry(Registry.REGISTRY_PORT);
		RMIRemoteInterfaceImpl multiply = new RMIRemoteInterfaceImpl();
		
		RMIRemoteInterface stub = (RMIRemoteInterface)UnicastRemoteObject.exportObject(multiply, 0);
		
		Registry registry = LocateRegistry.getRegistry();
		registry.rebind("Multiplyer", stub);
	}

}
